#ifndef DPVIEWVOLUME
#define DPVIEWVOLUME

#include <base\box3f.h>
#include <base\vec3d.h>
#include <base\plane.h>
#include <base\dprotation.h>

class viewVolume;

class dpViewVolume {

  vec3d projPoint;
  vec3d projDir;
  double nearDist;
  double nearToFar;
  vec3d llf;
  vec3d lrf;
  vec3d ulf;

public:

  void perspective(double fovy, double aspect, double nearval, double farval);
  void translateCamera(const vec3d & v);
  void rotateCamera(const dprotation& q);

  void copyValues(viewVolume & vv);
  static vec3f dp_to_vec3f(const vec3d & v);

  void getPlaneRectangle(const double distance, vec3d & lowerleft, vec3d & lowerright, vec3d & upperleft, vec3d & upperright) const;
  void getViewVolumePlanes(plane planes[6]) const;
};

#endif